import service from '@/utils/request'
import { createMenuList } from '@/router'

export function useMenuNavApi() {
	// return service.get('/data/menu/nav.json')
	return service.post('/api/strator/permission/tree/own');
}

export const useAuthorityListApi = () => {
	return service.get('/data/menu/authority.json')
}

export const useMenuListApi = () => {
	return service.post('/api/strator/permission/tree/all')
}
export const useMenuAddApi = (data: any) => {
	return service.post(data.id ? '/api/strator/permission/modify' : '/api/strator/permission/add', data)
}
export const useMenuApi = (id: Number) => {
	return service.post('/api/strator/permission/detail',{id})
}
